Method of creating NC data for grooving

ABSTRACT

A method of creating NC data for grooving, a unit normal vector (N) at the position (Pe) of a grooving end point is obtained after creation of NC data for grooving, a movement vector (D) is obtained by multiplying a designated movement distance (da) by the unit normal vector (N), and NC data for withdrawal are created for moving a tool (TL), by the amount of the movement vector (D), from the position (Pe) at which grooving ends.

DESCRIPTION

1. Technical Field

This invention relates to a method of creating NC data for grooving.More particularly, the invention relates to a grooving NC data creationmethod through which NC data are created for cutting a groove in athree-dimensional curved surface and withdrawing a tool from thethree-dimensional curved surface by a designated distance at the end ofgrooving.

2. Description of Background Art

In grooving a curved surface by, for example simultaneous five-axiscontrol, it is required at the end of grooving to withdraw the tool fromthe position at which cutting ends. To this end, the conventionalpractice is for the operator to designate during creation of NC data awithdrawal point or a withdrawal distance in which the +Z axis is takenas the withdrawal axis. This NC data is created in such a manner thatthe tool is withdrawn to the designated withdrawal point or thedesignated withdrawal distance along the +Z axis.

However, when determining a withdrawal point in an arbitrary directionor a withdrawal point at a position that is a designated distance in the+Z direction, a problem that arises is that the tool cuts away a portionof the curved surface of the article at withdrawal. FIG. 8 illustrates acase in which a tool TL is withdrawn from a grooving end point Pe awithdrawal distance f in the +Z direction. At withdrawal, the shadedportion of the three-dimensional curved surface SS is cut away.

SUMMARY OF THE INVENTION

Accordingly, an object of the present invention is to provide a groovingNC data creation method which makes it possible to simply create NC datawhich will not cause the curved surface of an article to be cut away atwithdrawal of a tool.

In a method of creating NC data for grooving according to the presentinvention, a unit normal vector at the position of a grooving end pointis obtained after creation of NC data for grooving, a movement vector isobtained by multiplying a designated movement distance by the unitnormal vector, and NC data for withdrawal are created for moving a tool,by the amount of the movement vector, from the position at whichgrooving ends.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic explanatory view of a method according to thepresent invention;

FIG. 2 is a block diagram of an apparatus for practicing a methodaccording to the invention;

FIG. 3 is a flowchart of processing according to a method of theinvention;

FIG. 4 is an explanatory view of a groove in a three-dimensional curvedsurface;

FIGS. 5 through 7 are explanatory views of a method of computing anormal vector according to the invention; and

FIG. 8 is an explanatory view of a prior-art method.

DESCRIPTION OF THE PREFERRED EMBODIMENT

FIG. 1 is a schematic explanatory view of a method according to thepresent invention, in which SS denotes a three-dimensional curvedsurface, GR a groove, Pe a position at which grooving ends, TL a tool,Ae a tool nose point corresponding to the grooving end point Pe, Pe' awithdrawal point, da a distance along which the tool is moved from thegrooving end point Pe to the withdrawal point Pe', N unit normal vectorat the point Pe, and D a movement vector for movement from the groovingend point Pe to the withdrawal point Pe'.

FIG. 2 is a block diagram of an automatic programming apparatus forpracticing a method according to the present invention. Numeral 101denotes a keyboard for data input, 102 a processor, 103 a ROM forstoring a control program, 104 a RAM, 105 a working memory, 106 acurved-surface memory for storing grid points of meshes MS specifyingthe curved surface SS (see FIG. 4), unit normal vectors at the gridpoints, and NC program data for the curved surface and groovingmachining, 107 an output unit for outputting, to an external storagemedium 108 such as a paper tape or magnetic tape, created curved surfacedata or NC program data for curved surface or grooving machining, 109 anaddress bus, and 110 a data bus.

FIG. 3 is a flowchart of processing for creating NC data for grooving inaccordance with the present invention, FIG. 4 is a view for describing agroove in a three-dimensional curved surface, and FIGS. 5 through 7 areexplanatory views of a method of computing a normal vector. A method ofthe present invention will now be described in accordance with theflowchart of FIG. 3. In FIG. 4, MK represents a groove curve forspecifying a groove on the three-dimensional curved surface. The groovecurve MK is obtained as a result of projecting a planar curve CV, whichis given on an X-Y plane, onto the curved surface SS. The groove curveMK is actually expressed as a point sequence composed of points ofintersection between the meshes MS of the curved surface SS and thecurve obtained by projecting the curve CV. It is assumed that positiondata indicative of each point on the sequence have already been storedin the RAM 104. As for the method of computing the groove curve, referto FIGS. 5 and 6 in the specification of International Application No.PCT/JP88/00159 (filed on Feb. 17, 1988 and entitled "Method of CreatingCurved Surfaces"). It is also assumed that the tool movement distance daand groove depth h at the grooving end point have already been enteredfrom the keyboard 101.

NC data are created for moving the tool TL to the grooving end point Pe(FIG. 4) along the groove curve MK (step 201). The tool TL is, forexample, capable of being controlled simultaneously along five axes,namely an X axis, Y axis, Z axis, horizontal rotational axis (B axis)and vertical rotational axis (C axis). NC data for simultaneousfive-axis control are created in such a manner that the vector of thecentral axis of the tool will point in the direction of the normal lineof the workpiece at each point constituting the groove curve (pointsequence) MK.

More specifically, letting the N1, N2 represent the normal vectors atmesh grid points Pk1, Pk2, as shown in FIG. 5, a normal vector N at apoint MK(j) constituting the groove curve is given byN=N2+(N1-N2).L2/(L1+L2). On the basis of the normal vector N (let thecomponents thereof along the respective axes be i, j, and k), toollength L and tool nose position (X,Y,Z), the position (x,y,z) of thecenter of rotation of the tool and the positions (b,c) of horizontal andvertical rotation are computed in accordance with the followingwell-known computation formulae:

    x=X+L·i

    y=Y+L·j

    z=Z+L·k

    b=tan.sup.-1 (i.sup.2 +j.sup.2 /k)

    c=tan.sup.-1 (j/i)

The NC data for simultaneous five-axis control are created using x, y,z, b and c. The tool nose position is commanded by the NC data to adepth h in the normal direction from a point on the groove curve MK.

When the processor 102 ends creation of NC data up to the grooving endpoint Pe (FIG. 1), the processor calls the point Pe from the RAM 104 andobtains the unit vector N at the point Pe (step 202). The unit vector Nat the grooving end point Pe is obtained through the following proceduredescribed with reference to FIGS. 6 and 7:

(1) Mesh grid points P(i,j), P(i+1,j), P(i,j+1), P(i+1,j+1) whichinclude the grooving end point Pe are obtained from the curved surfacememory 106.

(2) From the aforementioned four points, the points P(i,j), P(i+1,j),P(i+1,j+1), which constitute a triangle that includes the grooving endpoint Pe, are selected (see FIG. 6).

(3) Let S represent the area of the triangle including the grooving endpoint Pe, and let S0, S1, S2 represent the areas of the triangles eachof which has the grooving end point Pe as an apex, as shown in FIG. 7.The unit normal vector N at the grooving end point Pe is obtained inaccordance with the following equation: ##EQU1## using unit normalvectors N(i,j), N(i+1,j), N(i+1,j+1) corresponding to the points P(i,j),P(i+1,j), P(i+1,j+1) called from the curved surface memory 106.

Next, the processor 102 uses the unit normal vector N and the alreadyentered movement distance da to obtain the movement vector D inaccordance with the following equation (step 203):

    D=da·N

and then uses the position vector Pe the grooving end point and themovement vector D obtain the position vector Pe' the withdrawal point inaccordance with the following equation (step 204):

    Pe'=Pe+D

Thereafter, the position vector Pe' of the withdrawal point is used tocreate NC data for moving the tool TL from the grooving end point Pe tothe withdrawal point Pe' (step 205).

Thus, in accordance with the present invention, the arrangement is suchthat a unit normal vector at the position of a grooving end point isobtained, a movement vector is obtained by multiplying a designateddistance by the unit normal vector, and NC data for withdrawal arecreated for moving a tool, by the amount of the movement vector, fromthe position at which grooving ends. As a result, it is possible tosimply create NC data which will not cause cut-away at withdrawal of atool.

We claim:
 1. A method of using a memory and a processor for creating NCdata which is used to perform grooving by moving a tool along a cuttinggroove curve on a three-dimensional surface and by withdrawing the toola designated distance from the three-dimensional surface at an end pointof grooving, comprising the steps of:storing in the memory surface dataincluding the three-dimensional surface and curve data including thecutting groove curve; creating grooving NC data in the processor forperforming grooving machining based upon the stored surface data and thecurve data; calculating in the processor a unit normal vector at the endpoint; calculating in the processor a movement vector by multiplying thedesignated distance by said unit normal vector; and creating withdrawalNC in the processor for withdrawing the tool from the end part ofgrooving, based upon said movement vector.
 2. A method according toclaim 1, further comprising the step of:computing in the processor thecutting groove curve by projecting a two-dimensional curve onto thethree-dimensional surface.
 3. A grooving NC data creation methodaccording to claim 2, further comprising the steps of:partitioning inthe processor the three-dimensional surface by meshes, and computing inthe processor said data of the cutting groove curve by calculatingpoints of intersection between the cutting groove curve and said meshes.4. A method according to claim 1, further comprising the stepof:partitioning in the processor the three-dimensional surface by meshesthat intersect at grid points; and said step of calculating said unitnormal vector includes the sub-steps of: determining four of said gridpoints which enclose the end point, determining three grid points fromamong said four grid points that define a triangle which encloses theend point, said three grid points having respective normal vectors N0,N1 and N2; dividing said triangle into three sub-triangles each havingthe end point as an apex; calculating an area S of said triangle andrespective areas S0, S1, S2 of said three-sub-triangles; and calculatingthe following equation for said unit normal vector N at the end point:

    N=S0*N0/S+S1*N1/S+S2*N2/S.


5. A method using a memory and a processor for creating withdrawal NCdata which is used to withdraw a grooving tool a designated distancefrom a three-dimensional surface when the grooving tool reaches agrooving end point after cutting a groove into the three-dimensionalsurface, comprising the steps of:(a) storing in the memory thedesignated distance, surface data including the three-dimensionalsurface and grooving data including the grooving end point; (b)calculating in the processor a normal movement vector at the groovingend point, based upon said grooving data, surface data and thedesignated distance; and (c) creating withdrawal NC data in theprocessor for withdrawing the grooving tool, based upon said normalmovement vector.
 6. A method as recited in claim 5, wherein step (b)includes the substep of:(i) calculating a unit normal vector at thegrooving end point, based upon said surface data and said grooving data.7. A method as recited in claim 6, further comprising the stepof:partitioning in the processor the three-dimensional surface intomeshes that intersect at grid points; and sub-step (i) further includesthe sub-steps of:determining three of said grid points that define atriangle which encloses the grooving end point, said three grid pointshaving respective normal vectors N0, N1 and N2; dividing said triangleinto three sub-triangles each having the grooving end point as an apex;calculating an area S of said triangle and respective areas S0, S1 andS2 of said three sub-triangles; and calculating the following equationfor said unit normal vector N at the end point:

    N=S0*N0/S+S1*N1/S+S2*N2/S.


8. An apparatus for creating withdrawal NC data which is used towithdraw a grooving tool a designated distance from a three-dimensionalsurface when the grooving tool reaches a grooving end point aftercutting a groove into the three-dimensional surface, comprising:meansfor storing the designated distance, surface data including thethree-dimensional surface and grooving data including the grooving endpoint; means for calculating a normal movement vector at the groovingend point, based upon said surface data, grooving data and thedesignated distance; and means for creating withdrawal NC data forwithdrawing the grooving tool, based upon said normal movement vector.